-
Notifications
You must be signed in to change notification settings - Fork 191
feat: Add Interactive Browser Credential as a fallback #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Interactive Browser Credential as a fallback #307
Conversation
- Try all credentials in sequence --> Azure CLI (if tenantID given), Default, then Interactive - Removed ChainedTokenCredential as it fails if Azure CLI is not installed on client's machine - Tested the different auth mechanisms locally
|
||
// Try DefaultAzureCredential first (includes managed identity, environment variables, etc.) | ||
try { | ||
const defaultCredential = new DefaultAzureCredential(); // CodeQL [SM05138] resolved by explicitly setting AZURE_TOKEN_CREDENTIALS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this will bring back CodeQL warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kboom,
The comment indicated that the fix for the warning is to explicitly set the environment variable AZURE_TOKEN_CREDENTIALS
, which we are doing on lines 42-46.
I could not find any references on that particular warning [SM05138] on the internet, so not sure about its contents/reasons/fixes.
Closing the pull request, as it is against the contributor guidelines to contribute to an unapproved issue. |
@microsoft-github-policy-service agree company="Microsoft" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving towards OAuth flow as a default mode. It'll be completed once the App Registration is approved. See #368
#306
Associated Risks
✅ PR Checklist
🧪 How did you test it?
Locally used the server with and without the Azure CLI installed.